package com.five.monkey.feign.consumer.config;

import com.five.monkey.feign.consumer.filter.ConsumerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 狻猊
 * @date 2021/8/10 下午7:59
 */
@Configuration
public class ConsumerConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ConsumerInterceptor()).addPathPatterns("/**")
                .excludePathPatterns("/consumer/user/login");
    }
}
